<?php
include_once('config/config.php');

$LoginAdmin = checkAuth();

// 接受id
$id = isset($_GET['id']) ? $_GET['id'] : '';
if(empty($id)){
    showMsg('参数错误！');
}
// 删除数据
$sql = "DELETE FROM `department` WHERE `id` = '$id'";
$result = del('department',$id);
if ($result['code'] === 1) {
    showMsg($result['msg'], 'depList.php');
} else {
    echo $result['data'];
    exit;
}

?>